package com.itheima.service.impl;

import com.itheima.dao.LikesDao;
import com.itheima.domain.Collection2;
import com.itheima.domain.Likes;
import com.itheima.service.LikesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LikesServiceImpl implements LikesService {
    @Autowired
    private LikesDao likesDao;


    @Override
    public boolean save(Likes likes) {
        return likesDao.save(likes) > 0;
    }

    @Override
    public boolean delete(Likes likes) {

        return likesDao.delete(likes) > 0;
    }

    @Override
    public Likes getById(Likes likes) {
        Likes byId = likesDao.getById(likes);
        return byId;
    }
}
